const express = require('express')
const app = express()
const fs = require('fs')
const path = require('path')
const cors = require('cors')
// app.use(cors())
app.get('/login', (req, res) => {
    res.end('111')
})
app.post('/register', (req, res) => {
    res.send('222')
})

app.get('/province', (req, res) => {
    fs.readFile(path.join(__dirname, 'province.json'), (err, data) => {

        res.send(data.toString())
    })
})
app.get('/index.html', (req, res) => {
    fs.readFile(path.join(__dirname, '..', '6axios.html'), (err, data) => {
        // console.log(data.toString(),111)
        res.send(data.toString())
    })
})
app.listen(3000, () => {
    console.log(1121)
})
